﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SuperJ.CMS.Web.Areas.Admin.Controllers
{
    public class TestController : Controller
    {
        //
        // GET: /Admin/Test/
        
        public ActionResult Index()
        {
            var list = new List<Employee>
 
            {
            new Employee { Name = "Bob", Salary = 35000.00 },
            new Employee { Name = "Sherry", Salary = 75250.00 },
            new Employee { Name = "Kathy", Salary = 32000.50 },
            new Employee { Name = "Joe", Salary = 17500.00 }
            };
            ViewBag.a = list.Min(x => x.Salary);
            //ViewBag.b = list.OrderByDescending();
            double xx=0;
            for (double i = 1; i < 10; i++)
            {
                xx += 1 / i;
                
            }
            ViewBag.y = xx;
            return View();
        }
        //private IEnumerable<T> 
    }
    public class Employee
    {
        public string Name { get; set; }
        public double Salary { get; set; }
    }
}
